package com.xiaomi.shwx.common.util;

/**
 * Redis常量配置类
 *
 */
public class RedisConst {

    private RedisConst() {};

    //单位：秒
    public static final long SKUKEY_TIMEOUT = 24 * 60 * 60;
    // 定义变量，记录空对象的缓存过期时间
    public static final long SKUKEY_TEMPORARY_TIMEOUT = 10 * 60;

    //单位：秒 尝试获取锁的最大等待时间
    public static final long SKULOCK_EXPIRE_PX1 = 100;
    //单位：秒 锁的持有时间
    public static final long SKULOCK_EXPIRE_PX2 = 10;
    public static final String SKULOCK_SUFFIX = ":lock";

    public static final String USER_KEY_PREFIX = "user:";
    public static final long USER_CART_EXPIRE = 60 * 60 * 24 * 30;

    //用户登录
    public static final String USER_LOGIN_KEY_PREFIX = "user:login:";
    public static final int USERKEY_TIMEOUT = 60 * 60;

    //用户锁定时间 单位：秒
    public static final int SECKILL_TIMEOUT = 60 * 60 * 1;


}
